#pragma once

#include "../Core/Color.h"
#include "ScissorTest.h"
#include "ColorMask.h"

namespace Renderer
{
	enum class ClearBuffers
	{
		ColorBuffer = 1,
		DepthBuffer = 2,
		StencilBuffer = 4,
		ColorAndDepthBuffer = ColorBuffer | DepthBuffer,
		All = ColorBuffer | DepthBuffer | StencilBuffer
	};


	class ClearState
	{
	public:
		ClearState()
		{
			ScissorTest = Renderer::ScissorTest();
			ColorMask = Renderer::ColorMask(true, true, true, true);
			DepthMask = true;
			FrontStencilMask = ~0;
			BackStencilMask = ~0;

			Buffers = ClearBuffers::All;
			Color = Core::Color::FromArgb(100, 100, 100, 255);
			Depth = 1;
			Stencil = 0;
		}

		~ClearState()
		{
		}

	public:
		Renderer::ScissorTest ScissorTest;
		Renderer::ColorMask ColorMask;

		bool DepthMask;
		int FrontStencilMask;
		int BackStencilMask;

		Renderer::ClearBuffers Buffers;
		Core::Color Color;
		float Depth;
		int Stencil;
	};
}